﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MiniBug.Models.RegisterModel>" %>
<%@ Import Namespace="Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Register
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%=ResourceViews.AccountStrings.RegisterTitle %></h2>
    <p>
        Use the form below to create a new account.
    </p>
    <p>
        Passwords are required to be a minimum of
        <%= Html.Encode(ViewData["PasswordLength"]) %>
        characters in length.
    </p>
    <% using (Html.BeginForm())
       { %>
    <%= Html.ValidationSummary(true,  ResourceViews.AccountStrings.ValidationSummary) %>
    <div>
        <fieldset>
            <legend>Account Information</legend>
            <div class="editor-label">
                <%= ResourceViews.AccountStrings.FormNameLabel%>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(m => m.Name, new { @class = "required-text" })%>
                <%= Html.ValidationMessageFor(m => m.Name) %>
            </div>
            <div class="editor-label">
                <%= Html.LabelFor(m => m.Login) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(m => m.Login, new { @onchange = "CheckAvailability()", @class="required-text" })%>
                <%= Html.ValidationMessageFor(m => m.Login) %>
                <div style="display: inline;" id="usernamelookupresult"></div>
            </div>
            <div class="editor-label">
                <%=ResourceViews.AccountStrings.FormPasswordLabel %>
            </div>
            <div class="editor-field">
                <%= Html.PasswordFor(m => m.Password, new { @class = "required-text" })%>
                <%= Html.ValidationMessageFor(m => m.Password) %>
            </div>          
            <div class="editor-label">
                <%= Html.LabelFor(m => m.Email) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(m => m.Email, new { @class = "required-text" })%>
                <%= Html.ValidationMessageFor(m => m.Email) %>
            </div>
            <div class="editor-label">
                <%= ResourceViews.AccountStrings.FormReCaptchaLabel %>
            </div>
            <div class="editor-field">
            <%= Html.GenerateCaptcha() %>            
             </div>  
             <div class="editor-label">
                <%= Html.ActionLink("Regenerate Captcha","GenerateCaptcha") %>
            </div>       
            <p>
                <input type="submit" value="Register" />
            </p>
        </fieldset>
    </div>
    <% } %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CustomScript" runat="server">
</asp:Content>
